﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PSAMMatrixCloud.Model
{
    public class PSAMChannelManage: psam_matrixModel
    {
        /// <summary>
        /// 通道号
        /// </summary>
        public int Channel
        {
            get;
            set;
        }

        public static PSAMChannelManage AutoCopy(psam_matrixModel parent)
        {
            PSAMChannelManage child = new PSAMChannelManage();

            var ParentType = typeof(psam_matrixModel);

            var Properties = ParentType.GetProperties();

            foreach (var Propertie in Properties)
            {
                if (Propertie.CanRead && Propertie.CanWrite)
                {
                    Propertie.SetValue(child, Propertie.GetValue(parent, null), null);
                }
            }
            return child;
        }
    }
}
